package com.yimi.policyservice.repository;

import com.yimi.policyservice.entity.base.policy.PolicyAccfund;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface PolicyAccfundRepository extends JpaRepository<PolicyAccfund,String> {
    @Modifying
    @Transactional
    @Query(value = "delete from t_policy_accfund where policy_addr_id = ?1",nativeQuery = true)
    void deleteByAddrId(String id);

    PolicyAccfund findOneByPolicyAddrId(String id);
}
